package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.txt");
       /* String str="别看我只是一只羊";
        byte[] data=str.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        */
        fos.write(",羊儿的聪明难以想象~~".getBytes(StandardCharsets.UTF_8));

        System.out.println("完毕");
        fos.close();
    }
}
